added a utility.
added a test.
added test
remove a line.
bug fixed a few undefined.