allowing localmax to be configurable