First working version, just missing cntFPs and cntNodes