put parameter check on top, and added an echo for time to next ping