added comments and made sure tests are passing