updated check_command for ping