add dataread.c to read and manipulate data