modified for setting condition in search