removed duplicate perlin code