Modified get_power algorithm