added macro for defining resource behaviour