updated ping handling