cleaned up code by giving variables better names and adding a few comments