.write: accept boolean on/off