started modifying for complete db backend