added clarifications for code