fix bug with wrong maximum and pb in getting accurate positions
summary plots
debugging continued