script reorganisation