revised gradient, Fixes #21