simplify ennet script
making new script
incorporate 2 stages of optimization into a single script