throwing exception when you do not pass the corresponding values.