scripts adapted