Fixed IV. Added new test