added comments, output to file, updated README