add script callbacks