another refactor