solving exponential growth and decay problems