Finished the code, now to write tests and then actually test this