reference code for IG and clustering and Util