refactor into single purpose classes