fractal function written