Added comments to try to explain my code