Invariant tori in hamiltonian systems with two degrees of freedom in neighborhood of resonance