update if-statement solution