sort and random render