added support for frequency table input (closes #1).