puted hypot func to soberize the math calcule