search function seems to be working