added oldIndex param to onDrop function