funtion complete include search and status toolbar, fixed messy code, update some small funciton