refactored logs