Substitutional Doping in 2D materials