made profile pulling script generic