adding sorting table