added lots of comments