Crap implementation of pow
Taking last 10 digits of a number
Calculating pow only using the last 10 digits