Add setter to change threshold