updating code comments and readme