Modifying the orthogonality calculation