updated layout and sorting