missed one change that got munged
fixup to account for move to reshape2
fixup to account for move to reshape2, plus some bug fixes. Needs work...