working on my own icp implementation