JS now updates on drag and drop