remove inner function from header file