removed inefficient closure, and manual is_power_of_two