Passing all tests

needs comments and try-catch blocks