added calculating borders