For borders handling before performing convolution - working