refine endswith