Solution for Border problem