About to write rspec tests to finish this off