added plotting during optimization
working towards real geom