moved where the optimal cost was printed