reimplemented DB using sqlite (query still TBD)