refactor and move