comments and some indenting for readability