bit of refactoring, moved data into objects