improve search controller