code for main border layout- not finished