first commit, code needs a SERIOUS review, given that it was orginally written as I was learning C