added more ajax to handle searching