Identified potentiall bottleneck in elevationTest() funktion