changed code to make boundary (grid sizing) easier to edit