some formatting
some formatting cleanup and extra logging