add comments to code
fix bug in the drag and drop
delete needless function