Updated example with proper class