search function bug fixed, comment added