added ping and isalive functions. started unittesting.