puting retriveing app config vars code in a shared wrapper