cleaning up and grph