added methods for checking for triangularity