updating if..else statement and other minor updates

updating if..else statement and other minor updates