use sets instead of vector for relations