fixed bug with passing in reference to namespace rather than creating new namespace variable