fixed updating, fixed tests