added support for resource defining