Complete sortAttribute method in SketchBase class