fix changepoints accounting and demo file