implemented DrawText funtion for 2D