refactoring session, interface for building session store