Changing logic to take in and return object
Did nothing here