buggy sort