added some comments and clarifications