refactored and implementad faucet with db