pass options object to draw function