finished sequence erlang