adding comments

need to break main into separate functions