added if/elseif/else statements to file