add db helper and contract