I made and exponents block, even though there were a few others I find this one to be more efficient.
I just used a loop that essentialy does x*x y-1 times.