implement and test failure cases