fixed bugs in reading data, moving forward to analysis