interrupt loop while receiving data