added one more throw of an invalid parameter exception