fix update() method to use $set