initial and not yet complete ThingsDB implementation