Add optimisation of border.