Completed if logical exercise.