first pass at error handleing