actually refactor