db changed to object