pass db into repl, repl writes to db