add simple sort rules; enhance the debug.p_list