Changed the outdor graf to use the helper function