add is_prefix and then use it