implemented borders in layout