condition for solve