Modified document to include variables initialvalue, rate, numberof years and compyears