slow exponentiation example
refactoring code located in all onSaveInstanceState methods