swapped the order of params for the constructure to move the optional params to the end