added ensure parameter
with on_change