implemented pan modulation
included pan modulatin in the rutine