S-duality and modular transformation as a non-perturbative deformation of the ordinary pq-duality