problem refactor