This is the version I worked on in Ghana - code needs to be cleaned, and documented