added unit tests for grid thresholds