added bresenham implementation