changes necessary for outputing graphs