Tweaked drawSearch function