refactored with class methods
cleaned up specs, removed excess lines