working on sorting table