Addin second day exercise 2 of erlang