Minimization algorithm pre-end implemented