The Mega has 3 hardware serial ports. No need to user software serial.
Does it not actually have 4 hardware serial ports ?
yes i have rewritten the code because only one serial is available on the UNO. So i'm reading Serial data and sending it to softwareserial