lifted punctuation check outside of loop