changed upset to support $set and $inc