refactoring, function naming changes