trying to find right parameters for everything, also updated blowmap and cost_functino