c++ code written by me