Erlang Day1 exercise 3