//smart borders