added modified prolog scripts