added else if control structure with assignment