didn't work for some programs. trying a new method