script to normalize durations