Updated draw function.