updated.  should be finished, barring any bugs