huge restrecture, divide in main and graph data controller