filereader with some nice functions