add support for startswith and endswith methods