-- added sort_order
-- check for empty sort_order