First version of mandelbrot implementation