added funtion to gfx3