Add direction and boundary