add search module
clean some code