update me code with comments