changing response to a row vector and adding into file