return undef explicitly
better transaction error handling