Optimization on functional methods