Added core logic