initial commit
added output to file and also console output, working but needs improvement