Erlang Day1 exercise 2