Serial problem

alva:

  delay(5000);              // wait for a second

Comments should match the code, or just omit them.

when i send the data while microcontroller running the delay,
micro still processing data after the delay finished

That's how interrupts work.