add if condition check