now working for 2F and 1F1M cases.