move db stuff to store