reworking db structure