problems with sorting found and fixed during testing