last changes, no more segfaults still need to find right parameter set