works on history and prompt