clean up
creating upsert method