Add core logic