lots of delays, any other way??

To understand how to remove the delays, we need to know why you put them there. You are using while(Serial.available() > 0) , so you should have serial data available but, then you delay right after that. Was the delay a result of failed tests? Have you tried run the sketch without the delay and if so, what happened?

Mark