fixed some stuff still does not build, assuming sideffects at least in readIn because index values are not written back into original variable in main.c