From Loop to Presence Usage

changes while loop ping to use of presence when sending message to
observer