Added some comments.
fixed merge conflict