converted data to appropriate format by removing newlines