pay attention to sort, code cleaning