using logs for update of z's and t's; the latter seems still buggy for some reason