introduced Object struct for resource management