correct module name
replace modulo operator with i & (2^k -1)