hints from https://groups.google.com/forum/#!msg/acmesystems/otm4_54Y5mU/DJXmHqqAbIkJ