adding array with frequencies