Added the are_eq function which is commonly called in other routines