Updated demo code for new gonatty api