functions to read from corpus added