added sphere and plane code