exercise 6.8 added default value for input