need to update t _inside_ the loop!