added file loading and reading line by line