fixed errors in callback examples and  added new outputs for duration.