fixing up the resource model