move session store code over