Global SL Test

Implementation of the global SL test, poor performance with same function as below.