added very primitive database layer