added sqlite support for stats