moved the logic for end point being your own out