code completed

file io done
start of paper