solve the function return value problem. main function can return a melody now