use endsWith instead of contains