can handle list which length is not exponent of 2