added comments and updaed a few things