refactor order of classes and splitting out methods