making changes and adding comments relating to #1

I made changes and added comments. We can discuss at #1