removed unncessary whitespace, also added some comments to indicate
what's going on