change to catch/throw the explicit exceptions, update comments