a little DRY in renamenx and msetnx