using global constant for sampling freq