Changed Frequency and Duration from int to double