merged in new function, added var to config