merging fmw and rmb versions