deleted the piecewise regression chunk of code - isn't working well at defining timing