functionality added for search