shortened boundary.c