try this refactor