write test to fail when error is raised
actually write test to fail when error is raised
Add compact method so method error not raised and test passes