added tests, fixed first part of rhythm problem