sort working and verify the balance thing