Add prolog 3rd day code