check correct number of parameters