detect base of stem