added local and system memory modes. check the defines.