user search function improved