Added some codes, and comments on thoughts