working on 2_3 - seems to be a bug somewhere, keep getting nans