added frequency parameter