removed genCore and changed calcSalinity from global