More work on db