Add initial implementation of GK algorithm