renaming some helper functions