added bresenham line algorithm