added a lot of comments and help