Added variables and completed code