simplified mandelbrot code