Example code for Resource Management