added condition for advance search