begin to add search function