task chains in erlang