added comments about register use and formating to output