database open/close refactoring
IMPROVE seed filtering