1) handle the race condition for the return value.
2) handle the character escape more gracefully
3) fix the bug for handling the list struct
refactoring, doc