using the pythagorean theoremĀ