add listener to type spinner