Adding exception throwing