power via repeated squaring