updating if..else statement