added quadratic and cubic function for simulation