refactor?