Added some changes to the searchbox function