added events
events piecewise