refactored the dk table service into a lib