added playMelody and bugfix