update sqrt with long to replave int overflow check