replaced tabs with spaces
made the geometry matching more robust