adding (working) implementation from debian jessie/testing v0.6.0-6

merge latest code that is distributed in debian jessie/testing