refactored temp logging