program for topologic optimalizaton