fix end_with with other approach