fixed bug associated with line distance computation. turns out that the absolute value macro should have been used for only single value input