almost working, debuggin for needle.rep