refactor some more