fixed torus issues, pretty much working code with normalized output but resolution issues