added native KGW support

Code from Hashengineering.