added ping function
Merge pull request #231 from paczian/master

added ping function