Added core logic.