Implemented PMRes.
Tests