fixed bugs in piecewise linear time function, some updates to test case 01