database code added but errors present