erlang day2 exercise