Improved Metropolis so that it accepts a mixture of discrete and continuous variables