updates a mapping