Use sort function from bead_util