adding upsert functionality to component