added additional comments and formatted comments