fixing up config and function signature