easier to understand; use 4 boundary indices to control where to place an element