Understanding flashbacks and nightmares