adds select2 library and adapts code to use dropdown autocomplete inputs