The theory of General Relativity can be driven by the principle of least action. In principle having the action of the General Relativity, the theory can be quantized just as other physical theories. In general, quantization process follows two main methods: 1. Canonical quantization, 2. Path Integral quantization, but both methods face some problems in the case of gravitational fields, because the Lagrangian of the General Relativity contains second order derivatives other than the first order one. So it is not possible to quantize gravitational fields with defining the usual Legendre transformation and Hamiltonian nor the path integral method. To do so, we should write the action in terms of a lagrangian with first order derivation and a surface term. Working with the surface term and considering suitable boundary condition for matter fields is of great importance. Considering a closed manifold and Neumann boundary condition we can neglect the boundary terms. But doing the same work with the Dirichlet boundary condition yealds to redefinning the action with adding aa minus boundary term to cancel the effect of it. This work leads to some known concepts such as ADM mass, momentum and angular momentum in asymptomatically at spacetime limit. We have also studied all what mentioned above in f(R) and f(R,G) modi ed theories.