corrected line 16 - elseif