refactory ResourceUtil