change the order of the parameters and check they exist