Adding code to build the boundary