1st cut at iq program in erlang