scripts used in manuscript by Warren et al