removed headText and tailText in favor of a more general subText function