cleaned up logging a bit