don't mangle AttrDict's update method
add tests and fix bugs