added comments removed calculation testing function