code is now fixed and creating outputs correctly.  this commit still has the writerasters at each step for testing.