search and all print function