changed sort to singleton