code refactoring
add comment
Merge pull request #1 from dead-horse/rebuild

code refactoring
fix melody bug and arrive bug
Merge pull request #2 from dead-horse/bug-fix

fix melody bug and arrive bug