Updated end() method params for compatibility