added handling of all types of boundary conditions