add default values and onchange behavior