First attempts at implementing db