V4 adaptaed for non wg sizes that are not power of 2.