added optional config param to init