refactor

change recursive graph getter