added ping functionality for testing and as example