minor fixed, added comments