updated comments extensively