added variables and final print statement