created core logic.