add tolerance as a parameter for isOrthogonal