Not Erlang-y(I believe) idea taken from Rust