deleted unnecessary code from energy minimizer