Implemented pingOn and pingOff functions.