New and IMPROVED code for if/elseif/else file