move things into classes and different files