stanzas: merge two functions into one
stanzas: code reorganization