refactored a bunch of functionality into the methods array