ref: move icp funcs to icp.c