rewrote sample to use getstring instead of request