Added equals method to triple