add onchange handler on controller