added support for slider to control spending threshold