Added code for Dirichlet boundary condition