more tests. Handle errors correctly