Adding spinner logic when searching