value and weight updates for TD