remove synchronized
Fix a bug in Terminal app
revise interface to allow query more than 9 result at once
add possibleNextCodeWithCode: to find next valid code