graph construct script refactoring...