added bresenham routine