removing unneeded special cases and remove linking errors with next_power_of_2