making db protected