Got a working version of data transfer