toy code for erlang learning