functions done with sphere calc. using Math.pow