The mechanism of REM sleep for memory consolidation