needle functions