added in check to see if object exists and changed the schema