debuging almost done, to solveremain problem of exponential growth