made 'callback' parameter configurable