add comments and rm redundant code