Outlined changes to be implemented. Found c++ KGW implementation.