#checking at border points