clean up seperation of concerns a bit