simpler neater error catching