refactor with resource-specific ids