adding c++ code for gene