Optimized-ARM-RWSEM-algorithm