somekind of refactor
remove metagraph class
refactor