added a few comments and source reference