Finished the playtune function