added some comments.
fixed lint issue