add function to sort byte arrays