without using pythagoras theorem