Add the logic