refactory resource id