These 7 lines are copied twice above. Reuse them?