attempt to pass pointers as paramters to change outerscope variables.