basic implementation of Mandelbrot