make whitening optional for easier testing