inline sort and layout better