refactored inspector dan example