clean codes & add comments