determine drawing function in .add() and .set()

Fixes a bug with multiple .set calls.