added frequency calculator