some work on db schema