calculating scripts