cleaned up logging