adding the previous gfx.h file, will re-write the code