this may cause a problem, as dir can be up or down as well. (default:break; rather than default: throw)