Excercise 4 using variables