refactor-function