update for non power of two sizes