add a bunch of stuff hanging around
slow 074 solution in erlang