fix for #2 - all tests passes