add sorted entities
fix conflict