makeGraphic() function added