New functions

1. remove all unnecessary functions
2. change test cases