Could you rewrite this so that it can support allows multipleSelection feature (V2)