Solved problem #4 in variables