add callback to previewer script