added code to output derivatives
added derivative outputs for all sets of populations