fix bugs and refactor seeds