main code is done except for borders