fixed database integration