added some more comments and details