used Math.log2