Passes all tests. Minor things need to be added still