Completed exercise on If