changed update function for multiple updates within a schema