accomodate for empty boundaries