moving array declared inside pingAction to avoid potential stack overflow