added geometry code