addressed comments and fixed some formatting issues