power of two iterative case working