make db public code