Add border conditions