close #1. Allows for boundaries