pulling out more stuff into classes