silly way to calculate powers of 2 recursively