begining to refactor