added resource, id attributes to posts