added resource functionality