Updated to have grouped sorted items