upsert sessions working