frequency can now be calculated, just need to refactor the output