refactored the function names