used REJOIN to reduce number of append commands