no longer pass in app pointer
added some checks
getIsConnected()