started some basic logic for generating graph