added prolog mode