finally working on the core protocol