added a few inline comments