refactor function names