moved around the samples file read, but make sure to check later what's going on with the line, max_line business. I don't really understand it.