cleaning up a bit and adding more explanation