add sqlite based state storage