implemented spheresegment