test datagraph refactor to make script reusable