GSM sim300 code isn't working, guide me please

void setup(){
Serial.begin(9600); // the GPRS baud rate
delay(2500);

begin:
Serial.println("AT"); //To check if GSM module is working
if(!Serial.available())
goto begin;
delay(2000);
Serial.println("AT+CMGF=1"); // set the SMS mode to text
while(!Serial.available());

delay(1500);
}
void loop(){

delay(1500);
Serial.print("AT+CMGS=");
Serial.print('"');
Serial.print("xxxxxxxxxx");
Serial.print('"');
Serial.write(0x0D); // Carriage Return in Hex
Serial.write(0x0A);
delay(3000);
Serial.write(0x3E);
delay(2000);
Serial.println("hello"); //this is the message to be sent

delay(2000);

Serial.write(0x1A); //Ascii code of ctrl+z to send the message
Serial.write(0x0D); // Carriage Return in Hex
Serial.write(0x0A);
delay(5000);
while(1);
}