update model with many to many relationship