modify ping method