Added support for using REM