converted db accessors to procedures