added framework for needle layer