make sure changes is an array