Make draw function a little bit more efficient