improved talk algorithm, did some other stuff that i cant remember