Construction of multivariate distributions with given marginals