More schelling work and work for optimization exercises