added code for creating both boundaries