Tailoring the morphology of Pd nanoparticles on CNTs by nitrogen and oxygen functionalization