tightens up and adds graph