script that adds columns to freq matrix for each doc worked successfully