adapted to latest version of sitegen