Fixed niave exponentation function