compare department then number