doing frequency tracking now and outputting properly