remove unneccesary code from drawgfx