Passed all tests just needs a bit more commenting and cleaning