updated pi calculation script