add some cpp codes