Hamiltonian formulation for the motion of a two fluid system with free surface