refactored code - made melody playing more generic
refactoring