emit start and end events