edited a few things, notably some code comments