Checking for borders