added more functionality to the calculation process.