created function to calculate pi
Define Unit for void returns