created loadGraphics function