removed duplicate exception handling