Avoiding initialization problem of array elements
Frequency shift code implementation