finished and passed all tests. still need to clean it up though