Add first implementation and cpp implementation