Electronic properties of potassium-doped CuPc