adding in some comments to make it easier to see whats going on