completed exercise 1.4 - taking input from user