improved drag and split script