add optional smoothing

Signed-off-by: Joachim Dörr <mail@joachim-doerr.com>