added border guard