fixing last refactor