rest cpp code added