updated Graph and Main