On the finite element method