added a smarter zero handling and the option to specify and absolute variation