speed up forward and backward by making tweaks to logsum.  will need to go ahead and manually inline next though