complete sort directive