fixed search by value and print function.