used readLines method for reading file