works fine for odd number of overall length