put configuration in a callback function