move select2 util functions to own service