Modified sendData, should work better now