minor fixes, should now pass the tests