adding if condition flow