Electronic and magnetic properties of X-doped (X=Ni, Pd, Pt) WS2 monolayer