version 3.  added comments