Added reading of file and partitioning