refactored some function names to improve clarity