Coded calculations

Coded the variables and calculations