moved database to RAM
added some tests