added some rethrow code