Attempt2 at graphic.c