impl of cpp test