takes input from file

now reading from file
also printing something in each loop