changing script to update existing resources