Using NTM inputs and regression to abstract the copy function