bug sort