prepared script for generalization