implemented neighbor line operation