idea for refactor