added some comments

btw nice code formatting