more commenting and formatting