Method detecting REM was debugged. First approach