add some simple geometry code