tested against ubuntu 12.04, 14.04 and centos 65.