one more change to make geometry routines exact rather than fast
innermost layer is layer 0