almost done. Not sure if I used enum correctly also not sure about some other things. Need to sort that out and add comments.