slight restructuring of exceptions