All comments added.

code is tested and working.