add id to resource