implemented RS and basic graph.