A script I wrote to do some calculations for me