working on log2 prototype