fixed and verified RS MWD impl.