#434: sorting based on main names now