fixed function names based on code refactoring