a few more tests and handling some error cases