update metadata
use association instead of array of ids