added rollback on error; need to figure out how to close connection (may need to implement after(counter) as seen on stack overflow