refactor seeds db code