copied demo code over from my repo