Code for GKM research