error handling rev 1
dale