Contribution from BGS compiled, but not tested to confirm if it actually works or not.