head and tail for strings