Fixed Added Calculation to database